/*
Copyright (c) 2009, Young Digital Planet SA
All rights reserved.

* Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this 
  list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, 
  this list of conditions and the following disclaimer in the documentation 
  and/or other materials provided with the distribution.
* Neither the name of the Young Digital Planet SA nor the names of its 
  contributors may be used to endorse or promote products derived from this 
  software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF SUCH DAMAGE.
*/
package com.yauthor.module
{
	
	/**
	 * Launched when the activity state has changed. Contains change details
	 * 
	 * @eventType com.yauthor.feedback.YUserActionEvent.USER_ACTION
	 */
	[Event(name="userAction",type="com.yauthor.feedback.YUserActionEvent")]
	/**
	 * The interface for modules that are exercise activities. An exercise is the
	 * module that can check itself and provide a result, can give the user clues
	 * concerning the correct answer and send feedback (events concerning answers
	 * given by the user) to the framework.
	 */
	public interface IActivity extends ILocked
	{		
		/**
		 * Resets an activity to its initial state.
		 */
		function reset():void;
		/**
		 * Removes wrong answers from an activity.
		 */
		function resetWrong():void;
		/**
		 * Check an activity and return result information.
		 */
		function check():Result;
		
		/**
		 * Turn on/off the show correct answers mode. In this mode an activity shows 
		 * correct answers (as defined in the source document) to the user. An activity 
		 * should prevent user modifications in this mode, mark modes should be turned 
		 * off. When this mode is turned off an activity should restore answers 
		 * provided by the user. If an activity saves the state in this mode it should 
		 * store real user ansers not those shown.
		 */
		function get showAnswers():Boolean;
		/**
		 * @private
		 */
		function set showAnswers( show:Boolean ):void;
		
		/**
		 * Turn on/off mark the correct answers mode. In this mode an activity should
		 * put marks on user anwers to show the user which answers were correct.
		 * When this mode is turned on, the showAnswers mode must be turned off.
		 * It can cooperate with the markWrong mode. An activity can accept user
		 * interaction in this mode (if it is not explicitly locked). A mark style
		 * should be defined via a style sheet.
		 * @see #markWrong
		 * @see #locked
		 */
		function get markCorrect():Boolean;
		/**
		 * @private
		 */
		function set markCorrect( markCorrect:Boolean):void;
		
		/**
		 * Turn on/off the mark incorrect answers mode. In this mode an activity should
		 * put marks on user anwers to show the user which answers were incorrect.
		 * When this mode is turned on, the showAnswers mode must be turned off.
		 * It can cooperate with the markCorrect mode. An activity can accept user
		 * interaction in this mode (if it is not explicitly locked). A mark style
		 * shoud be defined via a style sheet.
		 * @see #markCorrect
		 * @see #locked
		 */
		function get markWrong():Boolean;
		/**
		 * @private
		 */
		function set markWrong( markWrong:Boolean):void;
		
	
	}
}